<?php if (!defined('THINK_PATH')) exit();?><style>
    .form-group label{width:85px}
</style>
<section class="content" >
    <div class="row">
        <div class="col-md-12">
            <div class="box box-danger">
                <div class="box-body">
                    <form id="site_public_editinfo_form">
                        <input type="hidden" name="id" value="<?php echo ($mobile["id"]); ?>" />
                        <div class="form-group">
                            <label style="display:inline-table">项目
                                <i class="fa fa-pencil-square-o"></i>:</label>
                            <input type="text" placeholder="请输项目名称"
                                   class="form-control"  data-validation="length"
                                   data-validation-length="min1"
                                   name="name" value="<?php echo ($mobile["name"]); ?>"
                                   data-validation-error-msg="请输项目名称"
                                   style="display:inline;width: 70%">
                        </div>
                        <div class="form-group">
                            <label style="display:inline-table">电话
                                <i class="fa fa-pencil-square-o"></i>:</label>
                            <input type="text" placeholder="请输入电话"
                                   class="form-control"
                                   data-validation="number"
                                   data-validation-length="min6"
                                   name="mobile" value="<?php echo ($mobile["mobile"]); ?>"
                                   data-validation-error-msg="请输入正确电话号码"
                                   style="display:inline;width: 70%">
                        </div>
                        <div class="box-footer">
                            <span class="input-group-btn">
                                <button class="btn btn-danger pull-left" type="button"  id="close-dialog">取消</button>
                                <button class="btn btn-primary pull-right" type="button" id='site_public_editinfo_form_submit'>提交</button>
                            </span>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript">
        $(function () {
            $('#site_public_editinfo_form_submit').click(function () {
                $('#site_public_editinfo_form').submit();
            });
            $.validate({
                onSuccess: function () {
                    publicEditinfoFormSubmit();
                    return false;
                }
            });
        });

        function publicEditinfoFormSubmit() {
            $.post("<?php echo U('System/add_dial');?>",
                    $("#site_public_editinfo_form").serialize(), function (res) {
                if (!res.status) {
                    $.messager.alert('提示信息', res.info, 'error');
                } else {
                    $.messager.alert('提示信息', res.info, 'info');
                    dialog.get('dialogPage').close().remove();
                    dialTable.fnDraw(false);
                }
            });

            return false;
        }
      </script>
</section>